use crate::ApiError;
use axum::extract::{FromRequestParts};

/// 通过[axum_extra::TypedHeader]提取器实现自己的提取器
///
/// 可以返回自定义的数据结构和状态码
#[derive(FromRequestParts)]
#[from_request(via(axum_extra::TypedHeader), rejection(ApiError))]
pub struct TypedHeader<T>(pub T);